@args(){
    AdminsModel admin
    List<AdminsRulesModel> adminsRules
}
<!DOCTYPE HTML>
<html>
    <head>
		<meta charset="utf-8">
		<title>权限用户</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		<!--[if lt IE 9]>
		<script type="text/javascript" src="@__ASSET__/admin/lib/html5shiv.js"></script>
		<script type="text/javascript" src="@__ASSET__/admin/lib/respond.min.js"></script>
		<![endif]-->
		
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/static/h-ui.admin/css/H-ui.admin.css" />
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/static/h-ui.admin/css/style.css" />    
		<link rel="stylesheet" type="text/css" href="@__ASSET__/admin/css/main.css" />          
		
		<!--[if IE 6]>
		<script type="text/javascript" src="@__ASSET__/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
		<script>DD_belatedPNG.fix('*');</script>
		<![endif]-->      
	</head>
    <body>        
        <!-- 面包屑 -->
        <nav class="breadcrumb">
            <i class="Hui-iconfont"></i>
			首页 <span class="c-gray en">&gt;</span>
			权限管理<span class="c-gray en">&gt;</span>
			<a href='@fullUrl({value="authority.Admins.index"})'>权限用户</a><span class="c-gray en">&gt;</span> 
			修改或添加权限用户 <a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
        </nav>
        <div class="page-container">
        	<!-- 如果有id说明是在修改啊 -->
        	@if(admin.getAdminid()){
            	<form class="form form-horizontal" id="form1" action='@fullUrl({value="Admins.editHandler"})' method="post">
            }else{
            	<form class="form form-horizontal" id="form1" action='@fullUrl({value="Admins.addHandler"})' method="post">
            }
                <div class="row cl">
		            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>所属角色：</label>
		            <div class="formControls col-xs-8 col-sm-9">
		                <span class="select-box">
		                <select name="admindata.ruleid" class="select">		                	
		                    <option value="0" @if(admin.getRuleid() == null || admin.getRuleid() == 0){ selected="selected" }>暂不设置</option>
                            @for(AdminsRulesModel adminsRule:adminsRules){ 
                                @if(admin.getRuleid() == adminsRule.getRuleid()){
                                    <option value="@adminsRule.getRuleid()" selected="selected">@adminsRule.getRulename()</option>
                                }else{
                                   <option value="@adminsRule.getRuleid()">@adminsRule.getRulename()</option>
                                }
                            }														
		                </select>
		                </span>
		            </div>
		        </div>
		        <div class="row cl">
		            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>用户名：</label>
		            <div class="formControls col-xs-8 col-sm-9">
		                <input type="text" class="input-text" value="@admin.getUsername()" placeholder="" id="username" name="admindata.username">
		            </div>
		        </div>
		        <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>密码：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="password" class="input-text" value="" placeholder="" id="password" name="admindata.password">
                    </div>
                </div>
		        <div class="row cl">
		            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
		            <div class="formControls col-xs-8 col-sm-9">
		                <input type="number" class="input-text" value="@admin.getMobile()" placeholder="" id="mobile" name="admindata.mobile">
		            </div>
		        </div>
		        <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>QQ：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="number" class="input-text" value="@admin.getQq()" name="admindata.qq" id="qq">
                    </div>
                </div>  
		        <div class="row cl">
		            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>邮箱：</label>
		            <div class="formControls col-xs-8 col-sm-9">
		                <input type="email" class="input-text" value="@admin.getEmail()" placeholder="@" name="admindata.email" id="email">
		            </div>
		        </div>	
		        <div class="row cl">
		            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
		            	<!-- 如果有id说明是在修改啊 -->
		            	@if(admin.getAdminid()){
		            		<input type="hidden" value="@admin.getAdminid()" name="admindata.adminid" id="adminid"/>
		            	}
		                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		            </div>
		        </div>
		    </form>
        </div>    
            
        <script type="text/javascript" src="@__ASSET__/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
        <script type="text/javascript" src="@__ASSET__/admin/static/h-ui/js/H-ui.min.js"></script>
         
        <!--_footer 作为公共模版分离出去-->
        <script type="text/javascript" src="@__ASSET__/admin/lib/layer/2.4/layer.js"></script> 
        <script type="text/javascript" src="@__ASSET__/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
        <!--/_footer 作为公共模版分离出去-->
        
        <!--请在下方写此页面业务相关的脚本-->
        <script type="text/javascript" src="@__ASSET__/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
        
        <!-- ajaxsubmit提交插件啦 -->
        <script type="text/javascript" src="@__ASSET__/admin/lib/jquery.form.min.js"></script>
        <script type="text/javascript">
	        $(function () {
	            var options = {
	                success: function (data) {
	                    if(data.errcode == 0){	                    	
	                    	layer.msg(data.msg,{icon:3});
	                    	setTimeout(function(){
	                    		window.location.href='@fullUrl({value="Admins.index"})';
	                    	},1000);
	                    	return true;
	                    }else{
	                    	layer.msg(data.msg,{icon:3});
	                    	return false;
	                    }
	                }
	            };
	            $("#form1").ajaxForm(options);
	        });
        </script>
    </body>
</html>